package com.hongdee.crm.task.dao.impl;

import com.hongdee.base.basedao.impl.BaseDaoImpl;
import com.hongdee.crm.task.dao.ITCrmTaskUserCountDao;
import com.hongdee.crm.task.entity.TCrmTaskUserCount;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by My on 2017/3/24.
 */
@Component
public class TCrmTaskUserCountDaoImpl extends BaseDaoImpl implements ITCrmTaskUserCountDao {
    @Override
    public TCrmTaskUserCount findUserCountByUserIdAndCompanyId(String userId, String companyId) throws Exception {
        Map<String,Object> map=new HashMap<>();
        map.put("uId",userId);
//        map.put("companyId",companyId);
        return (TCrmTaskUserCount) this.getHibernateDao().findEntityByHqlWithParams(
                "from TCrmTaskUserCount where uId=:uId",map);
    }
}
